package com.design.pattern.creator.builder.homework;

import com.alibaba.fastjson.JSONObject;

public class ConcretePrototype implements IPrototype{
    //各种属性
    private String name;
    //...各种属性
    public IPrototype clone() {
        ConcretePrototype p = new ConcretePrototype();
        String jsonStr = JSONObject.toJSONString(p);
        return JSONObject.parseObject(jsonStr, ConcretePrototype.class);
    }
}
